<template>
  <!-- 图标选择组件 -->
  <div>
    <el-select :value="value" :disabled="disabled"  clearable @clear="clearHandle">
      <template slot="prefix">
        <span class="icon-picker-selected" v-if="value !== '' && value != null">
          <i :class="value"></i>
        </span>
      </template>
      <el-option class="icon-picker-option" :value="value">
        <div>
          <ul>
            <li v-for="icon in icons.elementIcons" :key="icon" @click="iconClick('el-icon-' + icon)" >
              <span><i :class="'el-icon-' + icon"></i></span>
            </li>
            <div class="clearfix"></div>
          </ul>
        </div>
      </el-option>
    </el-select>
  </div>
</template>

<script>
import iconSelect from "./icon-select.js";
export default iconSelect;
</script>

<style  scoped>
@import "./icon-select.css";
</style>